﻿using System.ComponentModel.DataAnnotations;
using Yz.Base;
using Yz.Model.Enums;

namespace Yz.Model.Entities
{
    /// <summary>
    /// 用户信息
    /// </summary>
    public class User : UpdateEntity
    {
        /// <summary>
        /// 公司Id
        /// </summary>
        public int CompanyId { get; set; }
        /// <summary>
        /// 登录名
        /// </summary>
        [MaxLength(20)]
        public string LoginName { get; set; }
        /// <summary>
        /// 登录密码
        /// </summary>
        [MaxLength(40)]
        public string LoginPwd { get; set; }
        /// <summary>
        /// 姓名
        /// </summary>
        [MaxLength(20)]
        public string Name { get; set; }
        /// <summary>
        /// 用户类型
        /// </summary>
        public UserType UserType { get; set; } = UserType.Staff;
        /// <summary>
        /// 是否禁用
        /// </summary>
        public StatusType StatusType { get; set; } = StatusType.Enable;
        /// <summary>
        /// 备注
        /// </summary>
        [MaxLength(50)]
        public string Remark { get; set; } = "";
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; } = DateTime.Now;
    }
}
